﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="HienthiBL.aspx.cs" Inherits="HienthiBL" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
    function isconfirm() {
        var ck = confirm('Bạn có chắc xoá hay không?');
        if (ck == true)
            return true;
        else
            return false;
    }

        </script>



    <form id="form1" runat="server">
    <table style="width: 91%; height: 42px;">
        <tr>
            <td>
            
            <table border="1" width="600">
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" 
                    onitemcommand="Repeater1_ItemCommand">
                <HeaderTemplate>
                <tr>
                            <th align=center>STT</th>
							<th align=center>Họ Tên</th>
							<th align=center>Tiêu Đề</th>
							<th align=center>Nội Dung</th>
							<th align=center>Ngày Đăng</th>
							<th align=center>Máy Tính</th>	
							<th align=center>Xoá</th>	
							<th align=center>Sửa</th>					
                </tr>
                </HeaderTemplate>
                <ItemTemplate>
                <tr>
                        <td align=center><asp:HyperLink ID="hplSTT" runat="server" NavigateUrl='<%# "~/SuaBinhLuan.aspx?stt=" + DataBinder.Eval(Container.DataItem,"stt")%>' Text='<%# DataBinder.Eval(Container.DataItem,"stt")%>' /></td>
							<td align=center><%#Eval("hoten")%></td>
							<td align=center><%#Eval("tieude")%></td>
							<td align=center><%#Eval("noidung")%></td>
							<td align=center><%#Eval("ngaydang")%></td>
							<td align=center><%#Eval("mamay")%></td>
							<td align=center><asp:ImageButton ID="imagebtxoa" runat="server" CommandArgument='dk' CommandName="Xoa" OnClientClick='return isconfirm()'
            ImageUrl="images/action_remove.png" /></td>
                            <td>  <a align=left  href="Suabinhluan.aspx?stt=<%#Eval("stt")%>"> <img src="images/action_check.png"  alt ="Check" id ="check" /></img></a></td>
                </tr>
                
                </ItemTemplate>
                
                
                
                </asp:Repeater>
               </table>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:maytinhxachtayConnectionString %>" 
                    SelectCommand="SELECT [STT], [HoTen], [TieuDe], [NoiDung], [NgayDang], [MaMay] FROM [BinhLuan]">
                </asp:SqlDataSource>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:Repeater ID="Repeater2" runat="server">
                </asp:Repeater>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        </table>
    </form>
</asp:Content>

